package org.raymond.iworks.study.basic.feature;

import java.time.DayOfWeek;

public class JDK14Test {
    public static void main(String[] args) {
        var jdk14Test = new JDK14Test();
        jdk14Test.switchTest();
    }
    public void switchTest() {
        DayOfWeek day = DayOfWeek.FRIDAY;
        int numLetters = switch (day) {
            case MONDAY, FRIDAY, SUNDAY -> 6;
            case TUESDAY -> 7;
            case THURSDAY, SATURDAY -> 8;
            case WEDNESDAY -> 9;
        };
        System.out.printf("%s", numLetters);
    }
}
